main: Call setlocale()
authorColin Walters <walters@verbum.org>
Wed, 4 Sep 2013 20:44:54 +0000 (16:44 -0400)
committerColin Walters <walters@verbum.org>
Wed, 4 Sep 2013 20:45:51 +0000 (16:45 -0400)
While we're not translating anything right now, we should still
setlocale() so that our output is formatted as command line users will
expect.

src/ostree/main.c

index b7d402406cd04b7b4112001abc7875274db01459..f23e82601881ee7371db449c5e3c20946605f739 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <errno.h>
 #include <string.h>
+#include <locale.h>
 
 #include "ot-main.h"
 #include "ot-builtins.h"
@@ -66,6 +67,8 @@ main (int    argc,
   GError *error = NULL;
   int ret;
 
+  setlocale (LC_ALL, "");
+
   ret = ostree_run (argc, argv, commands, &error);
   if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED))
     ostree_usage (argv, commands, TRUE);